},
_tweenAndUpdatePanel: function() {
- this._freezeAndCloseIndicators();
+ this._closeIndicatorMenus();
Tweener.addTween(this, {
boxOpacity: 0,
onCompleteScope: this,
onComplete: function() {
this._updatePanel();
- this._thawIndicators();
Tweener.addTween(this, {
boxOpacity: 255,
time: Overview.ANIMATION_TIME / 2,
this._tweenAndUpdatePanel();
},
- _freezeAndCloseIndicators: function() {
+ _closeIndicatorMenus: function() {
for (let role in this.statusArea) {
let indicator = this.statusArea[role];
- indicator.freeze();
indicator.menu.close();
}
},
- _thawIndicators: function() {
- for (let role in this.statusArea) {
- let indicator = this.statusArea[role];
- indicator.thaw();
- }
- },
-
_hideIndicators: function() {
for (let role in PANEL_ITEM_IMPLEMENTATIONS) {
let indicator = this.statusArea[role];
this.setMenu(new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0));
this.setName(nameText);
- this._frozenCount = 0;
- },
-
- freeze: function() {
- this._frozenCount++;
- },
-
- thaw: function() {
- this._frozenCount--;
- if (this._frozenCount == 0)
- this.emit('thawed');
- },
-
- get frozen() {
- return this._frozenCount > 0;
},
setSensitive: function(sensitive) {
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._sessionUpdated();
-
- this.connect('thawed', Lang.bind(this, this._onThawed));
},
_sessionUpdated: function() {
},
_updatePresenceIcon: function(accountMgr, presence, status, message) {
- if (this.frozen)
- return;
-
if (Main.sessionMode.isLocked)
this._iconBox.child = this._lockedIcon;
else if (presence == Tp.ConnectionPresenceType.AVAILABLE)
this._presence.status = status;
},
- _onThawed: function() {
- this._updatePresenceIcon();
- },
-
_onMyAccountActivate: function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop');